<template>
  <div>
    <div class="recommendtitle">推销推荐</div>
    <div class="boxlist" v-for="item of recommendList" :key="item.id">
      <router-link :to="'/detail/'+item.id">
        <img :src="item.imgUrl" alt="">
        <div class="productprops">
          <span class="title">{{item.title}}</span>
          <span class="des">{{item.desc}}</span>
          <button class="price">查看详情</button>
        </div>
      </router-link>
    </div>
  </div>
</template>

<script>
export default {
  name: 'recommend',
  props: {
    recommendList: Array
  }
}
</script>

<style lang="stylus" scoped>
  @import "~@/assets/style/varible.styl"
.recommendtitle
  line-height .8rem
  font-size .3rem
  background  $color-black2
  padding-left .1rem
 .boxlist
    box-sizing border-box
    width: 100%
    height auto
    overflow hidden
    padding .2rem
    border-bottom 1px solid $color-black2
    img
      display block
      float left
      width 2rem
      height 2rem
    .productprops
      margin-left 2.2rem
      height 2rem
      .title
        display block
        width 100%
        height .6rem
        line-height .6rem
        font-size .34rem
        color $coler-black
      .des
        display block
        width 100%
        height .6rem
        line-height .6rem
        font-size .28rem
        color $color-black3
        overflow hidden
        white-space nowrap
        text-overflow ellipsis
      .price
        display block
        width 1.5rem
        height .45rem
        margin-top .2rem
        line-height .45rem
        font-size .26rem
        color $color-white
        background $color-orange
        border none
        border-radius .1rem
        em
          height .6rem
          font-size .28rem
          color $coler-black
</style>
